import java.util.Scanner;

public class GuessGame {
    public static void start(){

            int b = (int) (Math.random()*10+1);
            Scanner input=new Scanner(System.in);
            System.out.println("请输入1个10以内的数字：");
            int a = input.nextInt();
            int i=1;
            while( a != b && i<10)
            {
                System.out.println(a>b?"大了":"小了");
                System.out.println("请输入1个10以内的数字：");
                a = input.nextInt();
                i++;
            }
            String s = "";
            if(i<2)
            {
                s="你猜对了，你是牛人";
            }else if (i >= 5) {
                s="10次都猜不中你是脑残";
            } else {
                s="你猜对了，你的成绩不错";
            }
        System.out.println("结果是："+b+"你猜的次数为："+i+","+s);
        }
    }


